<!DOCTYPE html>
<html lang="en">
<head>
    <title>无线路由管理平台</title>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <link rel="stylesheet" href="css/bootstrap.min.css" />
    <link rel="stylesheet" href="css/bootstrap-responsive.min.css" />

    <link rel="stylesheet" href="css/unicorn.main.css" />
    <link rel="stylesheet" href="css/unicorn.grey.css" class="skin-color" />
    <link href="css/font-awesome.min.css" rel="stylesheet">
    <link rel="stylesheet" href="/css/jquery.qtip.min.css" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head>
<body>

<%include inc.html%>



<div id="content">
    <div id="breadcrumb">
        <a href="index.html" title="返回控制台" class="tip-bottom"><i class="icon-home"></i> 无线路由管理平台</a>
        <a href="#" class="current" >代理商/商户管理</a>
    </div>

    <div class="container-fluid">
        <div class="row-fluid">
            <div class="alert alert-info">
                <i class=" icon-cog"></i>

                <%if(retdata.roleinfo.flag=="1"){%>
                <%if(virusers==null){%>
                <STRONG class="red"> 您还可以添加<%=retdata.roleinfo.usernumber%>位下属商户。</STRONG>
                <%}else{%>
                <STRONG class="red"> 您还可以添加<%=retdata.roleinfo.usernumber-virusers.length%>位下属商户。</STRONG>
                <%}%>
                <%}else{%>
                通过《添加代理商/商户》进行开户处理。同时可根据不同代理商或商户类型配置其权限及其下属商户权限。
                <%}%>

                <a href="#" data-dismiss="alert" class="close">×</a>
            </div>
        </div>
        <div class="row-fluid">
            <div id="statusinfo" style="margin: 0 auto;" class="alert alert-block alert-<%if(typeof(retdata.success)!="undefined" && retdata.success==false){%>error<%}else{%>info<%}%>" id="info">
            <i class=" icon-cog"></i>
            <strong >
                <%=retdata.info %>
            </strong>
        </div>

    </div>

    <div class="row-fluid">
        <BR>
        <%if(retdata.roleinfo.flag=="1"){%>
        <%if(virusers==null){%>
            <a class="btn btn-primary" href="userinfo.html?oper=add">
                <i class="fa fa-plus-circle fa-lg"></i> 添加代理商/商户
            </a>
        <%}else if(retdata.roleinfo.usernumber-virusers.length > 0){%>
            <a class="btn btn-primary" href="userinfo.html?oper=add">
                <i class="fa fa-plus-circle fa-lg"></i> 添加代理商/商户</a>
        <%}%>
        <%}else{%>
        <a class="btn btn-primary" href="userinfo.html?oper=add">
            <i class="fa fa-plus-circle fa-lg"></i> 添加代理商/商户</a>
        <%}%>
        <div class="widget-box">
            <div class="widget-title">

            <h5>代理商/商户</h5>
        </div>

        <div class="widget-content nopadding">
            <table class="table table-bordered data-table">
            <thead>
                <tr>
                    <th>序号</th>
                    <th>用户名</th>
                    <th>权限信息</th>

                    <th>昵称</th>
                    <th>手机号码</th>
                    <th>电子邮箱</th>
                    <th>代理商/商户名</th>
                    <th>注册日期</th>
                    <th>失效日期</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
            <form   method="post"  />
            <input id="userlistnum" style="display: none" name="userlistnum" value="<%if(virusers!==null){%><%=virusers.length%><%}else{%>0<%}%>">
                <%if(virusers!==null){ virusers.forEach(function(post, index){%>
                    <tr class="gradeZ" id="tr_<%=post.id%>" >
                        <td style="text-align: center"><%=index+1%></td>
                        <td style="text-align: center"><%=post.username%></td>
                        <td style="text-align: center" >
                           <a href="#" id="a<%=index%>" class="green"  data-hasqtip="title"><%=post.rolename%>
                            <i class="fa fa-external-link"></i></a>
                        </td>

                        <div class="tooltiptext<%=index%>" style="display: none">
                            权限分级名称：
                            <%=post.rolename%>


                            <BR><BR>
                            可配置下属商户数：<%if(post.usernumber==-1){%>无限制<%}else{%><%=post.usernumber%>个<%}%>
                            <BR><BR>可配置wifi数：<%if(post.wifinumber==-1){%>无限制<%}else{%><%=post.wifinumber%>个<%}%>
                            <BR><BR>可配置ap数：<%if(post.apnumber==-1){%>无限制<%}else{%><%=post.apnumber%>个<%}%>
                            <BR><BR>可配置认证权限：
                            <%-post.authnumber%>
                            <BR><BR>可配置广告数：<%if(post.adnumber==-1){%>无限制<%}else{%><%=post.adnumber%>个<%}%>
                            <BR><BR>统计权限：
                            <%-post.statnumber%>
                            <BR><BR>收费标准：
                            <%=post.fee%>元
                        </div>
                        <td style="text-align: center"><%=post.nickname%></td>
                        <td style="text-align: center"><%=post.phonenumber%></td>
                        <td style="text-align: left"><%=post.email%></td>
                        <td style="text-align: center"><%=post.companyname%></td>
                        <td style="text-align: center"><%=post.regdate%></td>
                        <td style="text-align: center"><%=post.expiredate%></td>
                        <td style="text-align: center">
                            <a class="btn btn-danger" href="userinfo.html?oper=edit&id=<%=post.id%>">
                                <i class="fa fa-pencil-square-o fa-lg"></i> </a>
                            <a class="btn btn-danger" href="javascript:;" id="deloper"  onclick="deleteoper('<%=post.id%>')">
                                <i class="fa fa-trash-o fa-lg"></i> </a>
                         </td>
                    </tr>


                <%})%>
                <%}%>
            </form>
            </tbody>
        </table>
        </div>
    </div>

    </div>
    <BR>
    <div class="row-fluid">
        <div id="footer" class="span12">
            2014 &copy; 无线广告路由云管理平台
        </div>
    </div>





</div>


<script src="js/html5shiv.js"></script>
<script src="js/respond.min.js"></script>

<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>

<script src="js/unicorn.js"></script>
<script src="js/jquery.dataTables.min.js"></script>
<script type='text/javascript' src='js/bootbox.min.js' charset='utf-8'></script>
<script src="js/jquery.qtip.min.js"></script>
<script src="js/unicorn.useradmin.js"></script>

</body>
</html>
